<template>
    <div id='' class='add_menu'>
        <Add v-if="show" :hight="913" ref="addForm" :isInit="true" />
        <div class="button">
            <Button type="primary" @click="handleSubmitUpdate" :loading="submitting">保存修改</Button>
            <!-- <Button @click="handleResetUpdate" class="ivu-ml">重置</Button> -->
        </div>
    </div>
</template>
<script>
import Add from './add-updata.vue'
export default {
    name: '',
    inject: ['provideClick'],
    props: ['show'],
    data() {
        return {
            submitting: false,
        };
    },
    components: { Add },
    computed: {},
    beforeMount() { },
    mounted() { },
    methods: {
        // 表单提交更新方法
        handleSubmitUpdate() {
            this.$refs.addForm.getForm(() => {
                this.provideClick("隐藏新增", {})
            })
        },
        // 表单重置方法
        handleResetUpdate() {
            this.$refs.addForm.reset()
        }
    },
    watch: {}
}
</script>
<style lang='less' scoped>
.add_menu .button {
    width: 100%;
    text-align: right;
}
</style>